package com.xsdl.visitor.visit;

import java.util.List;

public class Main {

    public static void main(String[] args) {
        List<Accept> acceptList = List.of(new AFuncationImpl(), new BFuncationImpl(), new CFuncationImpl());

        Visit visit = new Funcation1Visitor();
        for (Accept accept : acceptList) {
            accept.accept(visit);
        }

        visit = new Funcation2Visitor();
        for (Accept accept : acceptList) {
            accept.accept(visit);
        }
    }

}
